package com.eva.learn.concurrent.thinkInJava;

import java.util.concurrent.ThreadFactory;

/**
 * 后台线程(守护线程)工厂
 * 
 * @author Evain.C
 *
 */
public class DaemonThreadFactory implements ThreadFactory {

	@Override
	public Thread newThread(Runnable r) {
		Thread t = new Thread(r);
		t.setDaemon(true);
		return t;
	}

}
